﻿using System;
using System.Data;
using SubSonic;

namespace Medianamik.UI.Web.Approbation.Data
{
    public partial class SPs
    {
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetPendingApprobationByGroupId Procedure
        /// </summary>
        public static StoredProcedure MedianamikGetPendingApprobationByGroupId(bool? publishing, bool? exactApprobationLevel, string groupid, string culture, int? pagesize, int? pageindex)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetPendingApprobationByGroupId", DataService.GetInstance("MedianamikProvider"), "dbo");

            sp.Command.AddParameter("@publishing", publishing, DbType.Boolean, null, null);

            sp.Command.AddParameter("@exactApprobationLevel", exactApprobationLevel, DbType.Boolean, null, null);

            sp.Command.AddParameter("@groupid", groupid, DbType.AnsiString, null, null);

            sp.Command.AddParameter("@culture", culture, DbType.AnsiString, null, null);

            sp.Command.AddParameter("@pagesize", pagesize, DbType.Int32, 0, 10);

            sp.Command.AddParameter("@pageindex", pageindex, DbType.Int32, 0, 10);

            return sp;
        }

        /// <summary>
        /// Creates an object wrapper for the medianamik_GetPendingApprobationByGroupIdCount Procedure
        /// </summary>
        public static StoredProcedure MedianamikGetPendingApprobationByGroupIdCount(bool? exactApprobationLevel, string groupid, string culture, bool? publishing)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetPendingApprobationByGroupIdCount", DataService.GetInstance("MedianamikProvider"), "dbo");

            sp.Command.AddParameter("@exactApprobationLevel", exactApprobationLevel, DbType.Boolean, null, null);

            sp.Command.AddParameter("@groupid", groupid, DbType.AnsiString, null, null);

            sp.Command.AddParameter("@culture", culture, DbType.AnsiString, null, null);

            sp.Command.AddParameter("@publishing", publishing, DbType.Boolean, null, null);

            return sp;
        }

    }

}
